#include <signal.h>
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
using namespace std; 

void handle(int s){
	cout << " Enter handle " << endl; 
	sleep(10);
	cout << " Leave handle" <<endl;
}
int main(){
	struct sigaction sig; 
	sig.sa_flags = SA_NODEFER;
	sig.sa_handler = handle; 
	cout << getpid() << endl; 
	
	//sigaction(SIGUSR1,&sig,0); 
	signal(SIGUSR1,handle); 
	while(1){
		
		
		cout << " I am in main \n" ; 
		sleep(1);
	}

}
